import type { ComponentImpWithoutMethods } from "@/components/low-code/core/index";

export const componentSchema: ComponentImpWithoutMethods[] = [
  {
    key: "",
    component: "Root",
    name: "根容器",
    field: "",
    selector: "",
    group: "page",
    describe: "",
    nestedChain: "",
    componentProps: {
      gridTemplateColumns: 3,
      ref: null,
      labelWidth: 100,
      labelPosition: "left",
      size: "default",
    },
    items: [],
  },
  //group:'base'
  {
    key: "",
    component: "Button",
    name: "按钮",
    field: "",
    selector: "",
    group: "base",
    describe: "",
    nestedChain: "",
    componentProps: {
      name: "按钮",
      actionType: "",
      messageCode: "",
      onClickEvents: [],
    },
  },
  {
    key: "",
    component: "ActionBar",
    name: "操作组",
    field: "",
    selector: "",
    group: "base",
    describe: "",
    nestedChain: "",
    componentProps: {
      align: "flex-start",
      buttonGroups: [
        {
          name: "按钮1",
          type: "primary",
        },
        {
          name: "按钮2",
          type: "default",
        },
      ],
    },
  },
  {
    key: "",
    component: "Input",
    name: "输入框",
    field: "",
    selector: "",
    group: "base",
    describe: "",
    nestedChain: "",
    required: false,
    componentProps: {
      disabled:false,
      label: "label",
      value: "",
      onChangeEvents: [],
      onFocusEvents: [],
      rules: [],
    },
  },
  {
    key: "",
    component: "Select",
    name: "下拉框",
    field: "",
    selector: "",
    group: "base",
    describe: "",
    nestedChain: "",
    required: false,
    componentProps: {
      disabled:false,
      label: "label",
      value: "",
      dataSourceType: "1",
      rules: [],
      options:  [],
      onChangeEvents: [],
    },
  },
  {
    key: "",
    component: "Date",
    name: "日期选择器",
    field: "",
    selector: "",
    group: "base",
    describe: "",
    nestedChain: "",
    required: false,
    componentProps: {
      disabled:false,
      label: "label",
      value: "",
      onChangeEvents: [],
      onFocusEvents: [],
      rules: [],
    },
  },
  {
    key: "",
    component: "Radio",
    name: "单选框",
    field: "",
    selector: "",
    group: "base",
    describe: "",
    nestedChain: "",
    required: false,
    componentProps: {
      disabled:false,
      label: "label",
      value: "",
      rules: [],
      onChangeEvents: [],
    },
  },
  {
    key: "",
    component: "Html",
    name: "HTML",
    field: "",
    selector: "",
    group: "base",
    describe: "",
    nestedChain: "",
    componentProps: {
      title: "HTML",
      value: `<div style="color:red">自定义文本<div>`,
    },
  },
  {
    key: "",
    component: "Table",
    name: "表格",
    field: "",
    selector: "",
    group: "base",
    describe: "",
    nestedChain: "",
    componentProps: {
      label: "label",
      pagination: false,
      columns: [
        {
          title: "姓名",
          dataIndex: "name",
          key: "name",
        },
        {
          title: "年龄",
          dataIndex: "age",
          key: "age",
        },
        {
          title: "住址",
          dataIndex: "address",
          key: "address",
        },
        {
          title: "创建时间",
          dataIndex: "createTime",
          key: "createTime",
        },
      ],
      tableData: [],
    },
  },
  {
    key: "",
    component: "Upload",
    name: "上传",
    field: "",
    selector: "",
    group: "base",
    describe: "",
    nestedChain: "",
    required: false,
    componentProps: {
      name: "上传",
    },
  },
  {
    key: "",
    component: "Slot",
    name: "插槽",
    field: "",
    selector: "",
    group: "base",
    describe: "",
    nestedChain: "",
    componentProps: {
      name: "slotName",
    },
  },

  // group:'container'
  {
    key: "",
    component: "Form",
    name: "表单域",
    field: "",
    selector: "",
    group: "container",
    describe: "",
    nestedChain: "",
    componentProps: {
      gridTemplateColumns: 3,
      ref: null,
      labelWidth: 100,
      labelPosition: "horizontal",
      size: "default",
    },
    items: [],
  },
  {
    key: "",
    component: "Card",
    name: "卡片",
    field: "",
    selector: "",
    group: "container",
    describe: "",
    nestedChain: "",
    componentProps: {
      header: "卡片标题",
    },
    items: [],
  },
  {
    key: "",
    component: "Tabs",
    name: "标签页",
    field: "",
    selector: "",
    group: "container",
    describe: "",
    nestedChain: "",
    componentProps: {
      defaultActiveKey: 0,
    },
    items: [
      {
        key: "NCQTYZGR",
        tabIndex: 0,
        component: "tab",
        name: "标签页1",
        componentProps: {},
        items: [],
      },
      {
        key: "NCQLYZGJ",
        tabIndex: 1,
        component: "tab",
        name: "标签页2",
        componentProps: {},
        items: [],
      },
    ],
  },
  {
    key: "",
    component: "Collapse",
    name: "折叠面板",
    field: "",
    selector: "",
    group: "container",
    describe: "",
    nestedChain: "",
    componentProps: {
      defaultActiveKey: 0,
    },
    items: [
      {
        key: "NCQZYZGR",
        tabIndex: 0,
        component: "collapseItem",
        name: "折叠标题1",
        componentProps: {},
        items: [],
      },
      {
        key: "NCQZYZGJ",
        tabIndex: 1,
        component: "collapseItem",
        name: "折叠标题2",
        componentProps: {},
        items: [],
      },
    ],
  },
  {
    key: "",
    component: "Row",
    name: "格栅",
    field: "",
    selector: "",
    group: "container",
    describe: "",
    nestedChain: "",
    componentProps: {
      gutter: 10,
    },
    items: [
      {
        key: "NCQZYZGB",
        component: "col",
        componentProps: {
          span: 12,
          offset: 0,
        },
        items: [],
      },
      {
        key: "RSBQFXGA",
        component: "col",
        componentProps: {
          span: 12,
          offset: 0,
        },
        items: [],
      },
    ],
  },
  {
    key: "",
    component: "Modal",
    name: "弹框",
    field: "",
    selector: "",
    group: "container",
    describe: "",
    nestedChain: "",
    componentProps: {
      params: [
        {
          key: "id",
          origin: "",
          value: "",
        },
      ],
      visible: true,
      title: "弹框",
      alias: "dialog",
      onShowEvents: [],
      onHideEvents: [],
    },
    items: [],
  },
];
